package cn.skyquant.quant4j.api.goods;

import cn.skyquant.quant4j.api.enums.BorkerType;
import cn.skyquant.quant4j.api.enums.GoodsType;

import java.io.Serializable;
import java.util.Objects;

public class GoodsDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    public Integer id;
    public BorkerType borkerType;
    public String symbol;
    public GoodsType type;
    public double avgSpread;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof GoodsDTO)) return false;
        GoodsDTO goodsDTO = (GoodsDTO) o;
        return Objects.equals(symbol, goodsDTO.symbol);
    }

    @Override
    public int hashCode() {
        return Objects.hash(symbol);
    }
}
